import Vue from 'vue'
import Router from 'vue-router'
import Hello from '@/components/Hello'
import motoracde from '@/page/motorcade'
import mycar from '@/page/mycar'
import find from '@/page/find'
import control from '@/page/control'
import New from '@/page/new'
import Note from '@/page/note'
import Share from '@/page/share'
import Enter from '@/page/enter'
import verify from '@/page/verify'
import hist from '@/page/hist'
import histOne from '@/page/histOne'
import histTwo from '@/page/histTwo'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/moto'
    },
    {
      path: '/',
      name: 'Hello',
      component: Hello
    },
    {
      path: '/moto',
      component: motoracde,
      redirect: '/moto/mycar',
      children: [
        {path: 'mycar', component: mycar,},
        {path: 'find', component: find},
        {path: 'control', component: control},
        {path: 'new', component: New},
        {path: 'note', component: Note},
        {path: 'Share', component: Share},
        {path: 'Enter', component: Enter},
        {path: 'Verify', component: verify},
        {
          path: 'hist', component: hist,redirect:'/moto/hist/one',
          children: [
            {path: 'one', component: histOne},
            {path: 'two', component: histTwo}
          ]
        }
      ]
    }

  ]
})
